<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>NGUI: Next-Gen UI kit: UIGeometry Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">NGUI: Next-Gen UI kit
   &#160;<span id="projectnumber">3.7.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_u_i_geometry.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_u_i_geometry-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">UIGeometry Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Generated geometry class. All widgets have one. This class separates the geometry creation into several steps, making it possible to perform actions selectively depending on what has changed. For example, the widget doesn't need to be rebuilt unless something actually changes, so its geometry can be cached. Likewise, the widget's transformed coordinates only change if the widget's transform moves relative to the panel, so that can be cached as well. In the end, using this class means using more memory, but at the same time it allows for significant performance gains, especially when using widgets that spit out a lot of vertices, such as UILabels.  
 <a href="class_u_i_geometry.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1986b0c83b78945ec994073e30230926"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#a1986b0c83b78945ec994073e30230926">Clear</a> ()</td></tr>
<tr class="memdesc:a1986b0c83b78945ec994073e30230926"><td class="mdescLeft">&#160;</td><td class="mdescRight">Step 1: Prepare to fill the buffers &ndash; make them clean and valid.  <a href="#a1986b0c83b78945ec994073e30230926">More...</a><br /></td></tr>
<tr class="separator:a1986b0c83b78945ec994073e30230926"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc88edc86de2e924ad59c120fd49a284"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#adc88edc86de2e924ad59c120fd49a284">ApplyTransform</a> (Matrix4x4 widgetToPanel)</td></tr>
<tr class="memdesc:adc88edc86de2e924ad59c120fd49a284"><td class="mdescLeft">&#160;</td><td class="mdescRight">Step 2: Transform the vertices by the provided matrix.  <a href="#adc88edc86de2e924ad59c120fd49a284">More...</a><br /></td></tr>
<tr class="separator:adc88edc86de2e924ad59c120fd49a284"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81f4518370f1ec96238d1b5ee44bd5db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#a81f4518370f1ec96238d1b5ee44bd5db">WriteToBuffers</a> (BetterList&lt; Vector3 &gt; v, BetterList&lt; Vector2 &gt; u, BetterList&lt; Color32 &gt; c, BetterList&lt; Vector3 &gt; n, BetterList&lt; Vector4 &gt; t)</td></tr>
<tr class="memdesc:a81f4518370f1ec96238d1b5ee44bd5db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Step 3: Fill the specified buffer using the transformed values.  <a href="#a81f4518370f1ec96238d1b5ee44bd5db">More...</a><br /></td></tr>
<tr class="separator:a81f4518370f1ec96238d1b5ee44bd5db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a21faf5d28120b8288b1b3378acee39c1"><td class="memItemLeft" align="right" valign="top">BetterList&lt; Vector3 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#a21faf5d28120b8288b1b3378acee39c1">verts</a> = new BetterList&lt;Vector3&gt;()</td></tr>
<tr class="memdesc:a21faf5d28120b8288b1b3378acee39c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Widget's vertices (before they get transformed).  <a href="#a21faf5d28120b8288b1b3378acee39c1">More...</a><br /></td></tr>
<tr class="separator:a21faf5d28120b8288b1b3378acee39c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70ebe64825fcf4a8c20f1ebc5b01d463"><td class="memItemLeft" align="right" valign="top">BetterList&lt; Vector2 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#a70ebe64825fcf4a8c20f1ebc5b01d463">uvs</a> = new BetterList&lt;Vector2&gt;()</td></tr>
<tr class="memdesc:a70ebe64825fcf4a8c20f1ebc5b01d463"><td class="mdescLeft">&#160;</td><td class="mdescRight">Widget's texture coordinates for the geometry's vertices.  <a href="#a70ebe64825fcf4a8c20f1ebc5b01d463">More...</a><br /></td></tr>
<tr class="separator:a70ebe64825fcf4a8c20f1ebc5b01d463"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0784fe129166a6d6174879d38c626971"><td class="memItemLeft" align="right" valign="top">BetterList&lt; Color32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#a0784fe129166a6d6174879d38c626971">cols</a> = new BetterList&lt;Color32&gt;()</td></tr>
<tr class="memdesc:a0784fe129166a6d6174879d38c626971"><td class="mdescLeft">&#160;</td><td class="mdescRight">Array of colors for the geometry's vertices.  <a href="#a0784fe129166a6d6174879d38c626971">More...</a><br /></td></tr>
<tr class="separator:a0784fe129166a6d6174879d38c626971"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:ad4172abd918d0d472fae43f1872a487e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#ad4172abd918d0d472fae43f1872a487e">hasVertices</a><code> [get]</code></td></tr>
<tr class="memdesc:ad4172abd918d0d472fae43f1872a487e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the geometry contains usable vertices.  <a href="#ad4172abd918d0d472fae43f1872a487e">More...</a><br /></td></tr>
<tr class="separator:ad4172abd918d0d472fae43f1872a487e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a922c3e7cd5248c90cfdee25ff5e403b1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_geometry.html#a922c3e7cd5248c90cfdee25ff5e403b1">hasTransformed</a><code> [get]</code></td></tr>
<tr class="memdesc:a922c3e7cd5248c90cfdee25ff5e403b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the geometry has usable transformed vertex data.  <a href="#a922c3e7cd5248c90cfdee25ff5e403b1">More...</a><br /></td></tr>
<tr class="separator:a922c3e7cd5248c90cfdee25ff5e403b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Generated geometry class. All widgets have one. This class separates the geometry creation into several steps, making it possible to perform actions selectively depending on what has changed. For example, the widget doesn't need to be rebuilt unless something actually changes, so its geometry can be cached. Likewise, the widget's transformed coordinates only change if the widget's transform moves relative to the panel, so that can be cached as well. In the end, using this class means using more memory, but at the same time it allows for significant performance gains, especially when using widgets that spit out a lot of vertices, such as UILabels. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="adc88edc86de2e924ad59c120fd49a284"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIGeometry.ApplyTransform </td>
          <td>(</td>
          <td class="paramtype">Matrix4x4&#160;</td>
          <td class="paramname"><em>widgetToPanel</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Step 2: Transform the vertices by the provided matrix. </p>

</div>
</div>
<a class="anchor" id="a1986b0c83b78945ec994073e30230926"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIGeometry.Clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Step 1: Prepare to fill the buffers &ndash; make them clean and valid. </p>

</div>
</div>
<a class="anchor" id="a81f4518370f1ec96238d1b5ee44bd5db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIGeometry.WriteToBuffers </td>
          <td>(</td>
          <td class="paramtype">BetterList&lt; Vector3 &gt;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetterList&lt; Vector2 &gt;&#160;</td>
          <td class="paramname"><em>u</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetterList&lt; Color32 &gt;&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetterList&lt; Vector3 &gt;&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BetterList&lt; Vector4 &gt;&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Step 3: Fill the specified buffer using the transformed values. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a0784fe129166a6d6174879d38c626971"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BetterList&lt;Color32&gt; UIGeometry.cols = new BetterList&lt;Color32&gt;()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Array of colors for the geometry's vertices. </p>

</div>
</div>
<a class="anchor" id="a70ebe64825fcf4a8c20f1ebc5b01d463"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BetterList&lt;Vector2&gt; UIGeometry.uvs = new BetterList&lt;Vector2&gt;()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Widget's texture coordinates for the geometry's vertices. </p>

</div>
</div>
<a class="anchor" id="a21faf5d28120b8288b1b3378acee39c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BetterList&lt;Vector3&gt; UIGeometry.verts = new BetterList&lt;Vector3&gt;()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Widget's vertices (before they get transformed). </p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a922c3e7cd5248c90cfdee25ff5e403b1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool UIGeometry.hasTransformed</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether the geometry has usable transformed vertex data. </p>

</div>
</div>
<a class="anchor" id="ad4172abd918d0d472fae43f1872a487e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool UIGeometry.hasVertices</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether the geometry contains usable vertices. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/NGUI/Assets/NGUI/Scripts/Internal/<a class="el" href="_u_i_geometry_8cs.html">UIGeometry.cs</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_u_i_geometry.html">UIGeometry</a></li>
    <li class="footer">Generated on Sat Sep 13 2014 05:29:18 for NGUI: Next-Gen UI kit by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
